//
//  GxNewFeatureViewController.swift
//  microblog
//
//  Created by 记忆不为 on 16/9/30.
//  Copyright © 2016年 记忆不为. All rights reserved.
//

import UIKit

class GxNewFeatureViewController: UICollectionViewController {

    let flowLayout = UICollectionViewFlowLayout()
    init() {
        super.init(collectionViewLayout: flowLayout)
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    override func viewDidLoad() {
        super.viewDidLoad()
        self.collectionView?.register(GxNewFeatureCell.self, forCellWithReuseIdentifier: "GxNewFeatureCell")
        setupLayout()
    }
    private func setupLayout() -> Void{
        flowLayout.itemSize = UIScreen.main.bounds.size
        flowLayout.minimumLineSpacing = 0
        flowLayout.minimumInteritemSpacing = 0
        flowLayout.scrollDirection = .horizontal
        collectionView?.bounces = false
        collectionView?.showsHorizontalScrollIndicator = false
        collectionView?.isPagingEnabled = true
    }
    override func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int{
        return NewFeatureCount
    }
    override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
        let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "GxNewFeatureCell", for: indexPath) as! GxNewFeatureCell
        
        cell.indexPath = indexPath
        return cell
    }
    
    private lazy var images : [String] = {
        let images : [String] = []
        for index in 0..<4{
            
        }
        
        return images
    }()
    
    
}
